package edu.guet.cn.blogbasics.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Transient;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author hejianding
 * @since 2021-03-30
 */
@Data
@Accessors(chain=true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Users对象", description="")
public class Users implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户的id，唯一的标识")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty(value = "用户的名称")
    private String userName;

    @ApiModelProperty(value = "用户的登录密码")
    private String password;

    @ApiModelProperty(value = "显示的名称")
    private String nickName;

    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @ApiModelProperty(value = "角色")
    private String role;

    @ApiModelProperty(value = "头像连接")
    private String avator;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "状态 0正常，1冻结")
    private Integer status;

    @ApiModelProperty(value = "个人介绍")
    private String introduce;

    @ApiModelProperty(value = "乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty(value = "用户年龄")
    private int userAge;

    @ApiModelProperty(value = "用户微信")
    private String userWeChat;

    @ApiModelProperty(value = "用户QQ")
    private String userQq;

    @ApiModelProperty(value = "用户手机")
    private String userPhone;

    @ApiModelProperty(value = "用户地址")
    private String userAddress;

    @ApiModelProperty(value = "项目仓库地址")
    private String userProjectAddress;

    @ApiModelProperty(value = "特长")
    private String userSpecialty;




    /**
     * @Transient 表明是临时字段,roles是该用户的角色列表
     */
    @Transient
    private List<String> roles;

}
